package com.zcxk.ws;

import io.vertx.core.json.JsonObject;

import java.util.HashMap;
import java.util.Map;

/**
 * @author wangping
 * @date 2023-07-20 13:59
 */
public enum ConnectionBizType {

  /**
   * 血氧
   */
  SPO2,

  /**
   * 心电
   */
  ECG,

  /**
   * 呼吸
   */
  RESP,
  ;

  private static final Map<ConnectionBizType, JsonObject> map = new HashMap<>();

  private static final String TYPE = "type";

  static {
    for (ConnectionBizType type : ConnectionBizType.values()) {
      map.put(type, JsonObject.of(TYPE, type.name()));
    }
  }

  public static JsonObject get(ConnectionBizType type) {
    return map.get(type);
  }
}
